package com.guava.baseutils;

import com.google.common.collect.Lists;

import java.util.Collection;
import java.util.Collections;
import java.util.List;

/**
 * @author: sun.hongliang
 * @create: 2019/03/20 14:06
 */
public class ComparbleTest {

    public static void main(String[] args) {
        Person person1 = new Person("a", "a", 2);
        Person person2 = new Person(null, "c", 1);
        List<Person> personList = Lists.newLinkedList();
        personList.add(person1);
        personList.add(person2);
        Collections.sort(personList);
        System.out.println(personList);
    }
}
